-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More Prop simplification rules #628
Conversation
@@ -1232,6 +1234,9 @@ simplifyProp prop = | |||
go (PNeg (PBool b)) = PBool (Prelude.not b) | |||
go (PNeg (PNeg a)) = a | |||
|
|||
-- Empty buf | |||
go (PEq (Lit 0) (BufLength k)) = peq k (ConcreteBuf "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this is a simplification?
Is it better on the SMT level to compare arrays instead of computing buffer length and comparing it to 0
?
Not entirely sure… the Props look nicer to my human eyes though 😂 I can
remove it if you think it’s all the same/worse. What do you think?
Mate
…On Mon 6. Jan 2025 at 21:54, Martin Blicha ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/EVM/Expr.hs
<#628 (comment)>:
> @@ -1232,6 +1234,9 @@ simplifyProp prop =
go (PNeg (PBool b)) = PBool (Prelude.not b)
go (PNeg (PNeg a)) = a
+ -- Empty buf
+ go (PEq (Lit 0) (BufLength k)) = peq k (ConcreteBuf "")
Are you sure this is a simplification?
Is it better on the SMT level to compare arrays instead of computing
buffer length and comparing it to 0?
—
Reply to this email directly, view it on GitHub
<#628 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXYLY5B6JPMKNO3CWHWIGND2JLUQJAVCNFSM6AAAAABUWH5A4WVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMZSHE2TKNRQG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I think it's OK. I was just thinking that if ever |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks for the review! |
Description
Three more prop simplification rules.
Checklist